<template>
	<view class="container">
		<view  class="container-list" v-for="(item,index) in userList" :key="index" @click="getInModelPage(item.EvaluationID)">
			<view>姓名：{{item.Name}}</view>
			<view>性别：{{item.Sex === '1' ? '男' : '女'}}</view>
			<view>年龄：{{item.Age}}</view>
			<view>评估时间：{{item.CreateTime}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {},
				userList: []
			}
		},
		onLoad() {
			this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
			this.getList(this.userInfo.OfficerID)
		},
		methods: {
			async getList(id) {
				const {
					data
				} = await uni.$http.get('/get_user_evaluation_records', {
					OfficerID: id
				})
				if(data.code === 200){
					this.userList = data.records
				}
				
			},
			getInModelPage(id){
				uni.navigateTo({
					url:'/views/modelPage?id=' + id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 20rpx;
		height: 100vh;
		overflow: auto;
		box-sizing: border-box;
		background-color: #f8f8f8;

		.container-list {
			width: 100%;
			background-color: #fff;
			border-radius: 12rpx;
			padding: 20rpx;
			box-sizing: border-box;
			margin-bottom: 30rpx;
			box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
			color: #999;

			view {
				margin-bottom: 10rpx;
				box-sizing: border-box;
			}
		}
	}
</style>